-- GENERATED SPELL FOR [Scarshield Spellbinder] --


function spell0_9098(pUnit, Event) --@Arcane Bolt,n/a--
pUnit:FullCastSpellOnTarget(13748,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9098', 1000, 1)
end

function spell1_9098(pUnit, Event) --@Counterspell,n/a--
pUnit:FullCastSpellOnTarget(15122,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9098', 15287, 1)
end

function spell2_9098(pUnit, Event) --@Mana Burn,n/a--
pUnit:FullCastSpellOnTarget(15785,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9098', 2000, 1)
end

function spell3_9098(pUnit, Event) --@Resist Fire,n/a--
pUnit:FullCastSpellOnTarget(15123,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_9098', 563, 1)
end

function Sorts_9098(pUnit, Event)
local choix_sorts_9098 = math.random(0, 3)
if choix_sorts_9098 == 0 then
pUnit:RegisterEvent('spell0_9098', 1, 1)
end
if choix_sorts_9098 == 1 then
pUnit:RegisterEvent('spell1_9098', 1, 1)
end
if choix_sorts_9098 == 2 then
pUnit:RegisterEvent('spell2_9098', 1, 1)
end
if choix_sorts_9098 == 3 then
pUnit:RegisterEvent('spell3_9098', 1, 1)
end
end

function mob9098_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_9098', math.random(1500, 3000), 1)
end

function mob9098_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9098_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob9098_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(9098, 1, 'mob9098_Action')
RegisterUnitEvent(9098, 2, 'mob9098_Leave')
RegisterUnitEvent(9098, 3, 'mob9098_Kill')
RegisterUnitEvent(9098, 4, 'mob9098_Die')
